//
//  SHLocationButton.swift
//  shaohuo
//
//  Created by vicoo on 16/5/5.
//  Copyright © 2016年 lchenc3. All rights reserved.
//

import UIKit

class SHLocationButton: UIImageView {

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code
    }
 
    
    var backgroundImageView: UIImageView?
    var titleLabel: UILabel?
    
    var titleColor: UIColor? {
        didSet {
            self.titleLabel?.textColor = self.titleColor
        }
        
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.setupViews()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder )
        
        self.setupViews()
    }
    
    func setupViews() -> Void {
        
        self.backgroundImageView = UIImageView(frame: self.bounds)
        addSubview(self.backgroundImageView!)
        self.backgroundImageView!.contentMode = UIViewContentMode.center
        //self.backgroundColor = UIColor.clear
        
        self.titleLabel = UILabel(frame: CGRect(x: 0, y: 2, width: self.bounds.width, height: 20))
        addSubview(self.titleLabel!)
        self.titleLabel?.textAlignment = NSTextAlignment.center
        self.titleLabel?.font = UIFont.systemFont(ofSize: 13)
    }
  */
}
